package com.zhiyou100.springbootweather.service.imp;

import com.zhiyou100.springbootweather.mapper.ICityMapper;
import com.zhiyou100.springbootweather.pojo.City;
import com.zhiyou100.springbootweather.service.ICityService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("cityService")
public class CityServiceImpl implements ICityService {
    @Resource
    private ICityMapper cityMapper;

    @Override
    public List<City> qeuryAll() {
        return cityMapper.selectList(null);
    }
    /*查询所有省*/
    @Override
    public List<City> queryAllPZH() {
        return cityMapper.queryAllPZH();
    }
    /*根据省查询所有的市*/
    @Override
    public List<City> queryAllLZH(String provinceZh) {
        return cityMapper.queryAllLZH(provinceZh);
    }
/*根据省和市 查询所有区*/
    @Override
    public List<City> queryAllCZH(String leaderZh,String pName) {
        return cityMapper.queryAllCZH(leaderZh,pName);
    }
}
